package org.asiainfo.system.domain.bo;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import org.asiainfo.common.core.validate.AddGroup;
import org.asiainfo.common.core.validate.EditGroup;
import org.asiainfo.system.domain.SysClient;
import lombok.Data;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.EqualsAndHashCode;
import org.asiainfo.common.mybatis.stream.core.domain.BaseEntity;
import java.util.List;

/**
 * 业务对象 sys_client
 * dotor-ww
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SysClient.class, reverseConvertGenerate = false)
public class SysClientBo extends BaseEntity {

    /**
     * 客户端id
     */
    @NotNull(message = "客户端ID不能为空", groups = {EditGroup.class})
    private String clientId;
    /**
     * 客户端key
     */
    @NotBlank(message = "客户端key不能为空", groups = { AddGroup.class, EditGroup.class })
    private String clientKey;
    /**
     * 客户端秘钥
     */
    @NotBlank(message = "客户端秘钥不能为空", groups = { AddGroup.class, EditGroup.class })
    private String clientSecret;
    /**
     * 授权类型
     */
    @NotNull(message = "授权类型不能为空", groups = {AddGroup.class, EditGroup.class})
    private List<String> grantTypeList;
    /**
     * 授权类型
     */
    private String grantType;
    /**
     * 设备类型
     */
    private String deviceType;
    /**
     * token活跃超时时间
     */
    private Integer activeTimeout;
    /**
     * token固定超时
     */
    private Integer timeout;
    /**
     * 刷新token固定超时
     */
    private Integer refreshTimeout;
    /**
     * 状态（0正常 1停用）
     */
    private String status;
}

